<template>
  <div>
    <img :src="url" alt="" />
    <p @click="add">{{ title }}</p>
  </div>
</template>

<script>
export default {
  props: ["url", "title"],

  methods: {
    add() {
      this.$emit("addList", this.title);
    },
  },
};
</script>

<style scoped>
div {
  width: 200px;
}
</style>